package cn.bdqn.fragment01;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;



public class BlankFragment extends Fragment {

    private TextView tvContent;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {

        View view=inflater.inflate(R.layout.fragment_blank, container, false);
        tvContent=view.findViewById(R.id.tv_Content);
                tvContent.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        //静态绑定
                        Toast.makeText(getActivity(), "你点击了fragment的TextView", Toast.LENGTH_SHORT).show();
                    }
                });
        return view;
    }
}
